package com.kgame5.xtank3d.model.tank.fsms.fire {
import kgame5.kutil.T;

import com.kgame5.xtank3d.GameEnum;
import com.kgame5.xtank3d.model.tank.fsms.TankState;
import com.kgame5.xtank3d.vo.MyTankVO;

/**
 * @author kk
 */
public class StateReloadShot  extends TankState{
	
	//________________Propetty__________________
	
	//__________________Method___________________
	public function StateReloadShot(pvo:MyTankVO){
		super(GameEnum.STATE_TANK_RELOAD_SHOT, pvo);
		
	}
	
	//进入状态
	override public function enter(info:Object=null):void{
		//启动等待射击动画
		fsm.sendNotify(GameEnum.RELOAD_START);
		timer.start(tankVO.body.ReloadShotMS);
	}

	//执行状态
	override public function update():void{
		if(timer.isOK()){
			T.p("装填炮弹完毕");
			fsm.SwitchState(GameEnum.STATE_TANK_WAIT_FIRE);
		}
	}
	
	//退出状态
	override public function exit():void{
		//退出等待射击动画
		fsm.sendNotify(GameEnum.RELOAD_END);
	}
	
}//end of class
}